<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./axios.js"></script>
</head>

<body>
    <script>
        let getUrl = 'https://www.easy-mock.com/mock/5b0412beda8a195fb0978627/temp/list'
        let postUrl = 'https://www.easy-mock.com/mock/5b0412beda8a195fb0978627/temp/add'

        axios.get(getUrl, {
            params: { name: 'zs', age: 10 }
        }).then(result => {
            let data = { result }
            console.log(data)
            return axios.post(postUrl, { name: 'lisi', age: 20 })
        }).then(result => {
            let { data } = result
            console.log(data)
            return axios.get('1.json', {
                params: {
                    a: 10,
                    b: 20
                }
            })
        }).then(result => {
            let { data } = result
            console.log(data)
        })
    </script>
</body>

</html>